package com.itzhouwei.commerce.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;

/**
 * 通用响应对象定义
 * @description: 通用响应对象定义
 * @author：zw，微信公共号：yingshengzw
 * @date: 2021/8/28
 * @Copyright：公众号：搬砖暗夜码农 | 博客：https://itzhouwei.com - 沉淀、学习、分享、成长，让自己和他人都能有所收获！
 */


public class CommonResponse<T> implements Serializable {
    /**错误码*/
    private  Integer code;

    /** 错误消息*/
    private String message;

    /** 泛型响应数据*/
    private T data;


    public void setCode(Integer code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public CommonResponse(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
